Skip to content

chore: Tag tx with SwapAPI marker#3136

Open
dijanin-brat wants to merge 7 commits intomasterfrom
dijanin-brat/tagTxWithSwapApiMarker
Open

chore: Tag tx with SwapAPI marker#3136
dijanin-brat wants to merge 7 commits intomasterfrom
dijanin-brat/tagTxWithSwapApiMarker

Conversation

@dijanin-brat
Copy link
Copy Markdown
Contributor

@dijanin-brat dijanin-brat commented Mar 31, 2026

This change will allow us to specify if we want to tag the tx with SwapAPI marker and append that marker in TransactionClient before trying to send it.

INFO: This isn't tested fully yet!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d1a91d2eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dijanin-brat
Copy link
Copy Markdown
Contributor Author

@codex please review

@dijanin-brat dijanin-brat added the do not merge Don't merge until label is removed label Mar 31, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

export async function willSucceed(transaction: AugmentedTransaction): Promise<TransactionSimulationResult> {
applySwapApiCalldataMarkerInPlace(transaction);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to put this in willSucceed? This seems incorrect since now every time we simulate we are tagging data with swapAPI calldata, which normally is fine but breaks anything which actually looks at msg.data, which I imagine is broad enough to potentially cause unforseen simulation issues.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is, we really should limit this to only specific transactions. You can e.g. conditionally add this if the calldatamarker in the augmented transaction is defined.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, but we are already checking if the marker is defined in AugmentedTransaction object at the beginning of applySwapApiCalldataMarkerInPlace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Don't merge until label is removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants